package com.xiong.handler;

import com.xiong.response.ErrorResult;
import com.xiong.response.ResultCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 熊宇
 * @date 2022/4/29 17:21
 * @description
 */
@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler({Throwable.class})
    public ErrorResult bizExceptionHandler(Throwable e) {
     return ErrorResult.fail(ResultCode.NO_PERMISSION,e);
    }
}
